import { Grid ,WhiteSpace} from 'antd-mobile';
import React from 'react';
import {routerRedux} from 'dva/router';
import { connect } from 'dva';
class ClassifyHome extends React.Component{
	tolist = () =>{
		const { dispatch } =this.props;
		dispatch({
			type:'global/isShowTab',
			payload:false,
		})
		dispatch(routerRedux.push('productlist'))
	}

	render(){
	const data1 = Array.from(new Array(19)).map(() => ({
  		icon: 'https://gw.alipayobjects.com/zos/rmsportal/WXoqXTHrSnRcUwEaQgXJ.png',
	}));
		return(
		<div style={{height:'100%'}}>
			<WhiteSpace size='lg'/>
			<div style={{fontSize:'20px',textAlign:'center'}}>高水订货</div>
			<WhiteSpace size='lg'/>
			<Grid data={data1} 
			columnNum={3} 
			itemStyle={{ height: '120px', background: 'rgba(0,0,0,.05)' }} 
			onClick={this.tolist}/>
		</div>
		)
	}
}
export default connect(({classify ,global}) =>({
  classify,global
}))(ClassifyHome)